package cn.com.shopec.erp.product.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * @ClassName: SpecValOption
 * @Description: 货品规格值的选项表的实体类
 * 
 */
@Entity
@Table(name = "TBL_SPEC_VAL_OPTION")
public class SpecValOption implements Serializable {
    private static final long serialVersionUID = 1746354347727286687L;
    /** id **/
    private String id;
    /** 选项编号 **/
    private String optionNo;
    /** 选项名称 **/
    private String optionName;
    /** 规格编号 **/
    private String specNo;
    /** 删除标识（0：已删除，1：未删除） */
    private int deleteFlag;
    /** 创建时间 */
    private String createTime;
    /** 更新时间 */
    private String updateTime;

    private Specification specification;

    @GenericGenerator(name = "generator", strategy = "uuid.hex")
    @Id
    @GeneratedValue(generator = "generator")
    @Column(name = "ID", unique = true, nullable = false, length = 32)
    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Column(name = "OPTION_NO")
    public String getOptionNo() {
        return this.optionNo;
    }

    public void setOptionNo(String optionNo) {
        this.optionNo = optionNo;
    }

    @Column(name = "OPTION_NAME")
    public String getOptionName() {
        return this.optionName;
    }

    public void setOptionName(String optionName) {
        this.optionName = optionName;
    }

    @Column(name = "SPEC_NO")
    public String getSpecNo() {
        return this.specNo;
    }

    public void setSpecNo(String specNo) {
        this.specNo = specNo;
    }

    @Column(name = "DELETE_FLAG")
    public int getDeleteFlag() {
        return this.deleteFlag;
    }

    public void setDeleteFlag(int deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    @Column(name = "CREATE_TIME")
    public String getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    @Column(name = "UPDATE_TIME")
    public String getUpdateTime() {
        return this.updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    // @ManyToOne(targetEntity = Specification.class, cascade = CascadeType.ALL)
    // @JoinColumn(name = "SPEC_NO", referencedColumnName = "SPEC_NO",
    // insertable = false, updatable = false)
    // public Specification getSpecification() {
    // return this.specification;
    // }
    //
    // public void setSpecification(Specification specification) {
    // this.specification = specification;
    // }

}
